package com.fm.webrtc.presenter;

import com.fm.webrtc.view.ProducerView;

public class ProducerPresenter {
    private boolean video = true;
    private boolean audio = true;
    private ProducerView producerView;
    public ProducerPresenter(ProducerView producerView) {
        this.producerView = producerView;
    }

    public void videoTrigger() {
        video = !video;
        if (video){
            producerView.resumeProducer("video");
        } else {
            producerView.pauseProducer("video");
        }
    }

    public void audioTrigger() {
        audio = !audio;
        if (audio){
            producerView.resumeProducer("audio");
        } else {
            producerView.pauseProducer("audio");
        }
    }
}
